/**
 * Created by hjqi on 2016/1/13.
 */
/*
 users.schema
 {
 "_id" : ObjectId("5812c20c629181dee307481c"),
 "username" : "nature01",
 "password" : "$2y$05$rtsPxIkbsRf/oEC9B1.rP.DgRLiGSSiaBvIuW/qR2cP7LT9/Tfss.", //通过对密码计算BCrypt hash生成的字符串
 }
*/

test() ;

function test(){
    return new Promise(function(resolve,reject){
        return resolve(true) ;
    }).then(function(ret){
        console.log("then1"+ret) ;
        throw err ;
    }).catch(function( ){
        console.log("catch1" ) ;
        throw err
    }).then(function( ){
        console.log("then2") ;
    }).catch(function( ){
        console.log("catch2") ;
    });
}


